import Vue from "vue";
import Vuex from "vuex";
import { commit_model } from "@/utils/model";
Vue.use(Vuex);
//挂在vuex原型
/**
 * @description: 
 * @param {Object} modelInfo // 载入对象
 * @param {String} modelConfig // 模块路径
 * @return {void}
 */
Vuex.Store.prototype.$commitModel = function(modelInfo , modelConfig){
  this.commit("commit_model",{
    modelInfo
    ,modelConfig
  });
}

const store = new Vuex.Store({
	state: {},
	mutations: {
		commit_model,
	},
	getters: {},
	actions: {}
})

export default store
